package cn.demo.app.gateway;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author: float 2023/7/5 17:26
 */
@Component
public class SimpleGatewayFilterFactory extends AbstractGatewayFilterFactory {
    @Override
    public GatewayFilter apply(Object config) {
        return new SimpleFilter();
    }

    @Override
    public String name() {
        return "Simple";
    }

    @PostConstruct
    public void init(){
        System.out.println("simple gateway filter factory init");
    }
}
